package com.ybkj.o2o.zhuanche.entity;

import com.alibaba.fastjson.annotation.JSONField;

import org.apache.commons.lang3.BooleanUtils;

import java.io.Serializable;
import java.util.Date;


public class Passenger implements Serializable {
  private Long id;

  private String name;// 乘客姓名

  private String phone;// 乘客电话

  private Boolean allowOverdraw;// 是否允许签单

  private Double drawMoney;// 可提现金额

  private Double nodrawMoney;// 不可提现金额

  private Double frozenMoney;// 冻结金额

  private Double receiptMoney;// 可开票金额

  private Long enterpriseId; // 所属企业Id

  private String enterpriseName; // 所属企业名称

  private String plateNumber;// 车牌号

  private String photo;// 头像地址

  private Long gradeId; // 级别Id

  private String gradeName; // 级别名称

  private Boolean inBlackList;// 是否为黑名单乘客

  private Integer type;// 类型:0个人,1企业

  private String idcard;// 身份证号码

  private Integer gender;// 性别

  private String email;// 邮箱

  private String memo;// 备注

  private Double latitude;// 纬度

  private Double longitude;// 经度

  private Long drivingNumberTimes;// 代驾次数

  private String deviceType; // 设备类型

  public String getDeviceType() {
    return deviceType;
  }

  public void setDeviceType(String deviceType) {
    this.deviceType = deviceType;
  }

  public Double getReceiptMoney() {
    return receiptMoney;
  }

  public void setReceiptMoney(Double receiptMoney) {
    this.receiptMoney = receiptMoney;
  }

  private String address;// 简单地址:如(翰林世家)
  @JSONField(format = "yyyy-MM-dd HH:mm:ss")
  private Date created; // 注册时间
  @JSONField(format = "yyyy-MM-dd HH:mm:ss")
  private Date updated;

  private Integer version;// 操作版本

  private Long channelId;// 渠道Id

  private String channelName;// 渠道名称

  private String appKey;// 用于区别系统

  private Long companyId;// 所属公司Id

  private String companyName;// 所属公司名称

  private String introducer;// 推荐人

  private Integer introduceType;// 推荐人类型：0客户,1司机
  
  private PassengerGrade passengerGrade; //客户等级

  private String appVersion;// app版本

  private static final long serialVersionUID = 1L;


  public String getAppVersion() {
    return appVersion;
  }

  public void setAppVersion(String appVersion) {
    this.appVersion = appVersion;
  }

  public Long getDrivingNumberTimes() {
    return drivingNumberTimes;
  }

  public void setDrivingNumberTimes(Long drivingNumberTimes) {
    this.drivingNumberTimes = drivingNumberTimes;
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getName() {
    return name != null ? name : "";
  }

  public void setName(String name) {
    this.name = name == null ? null : name.trim();
  }

  public String getPhone() {
    return phone != null ? phone : "";
  }

  public void setPhone(String phone) {
    this.phone = phone == null ? null : phone.trim();
  }

  public Boolean getAllowOverdraw() {
    return BooleanUtils.toBoolean(allowOverdraw);
  }

  public void setAllowOverdraw(Boolean allowOverdraw) {
    this.allowOverdraw = allowOverdraw;
  }

  public Double getDrawMoney() {
    return drawMoney != null ? drawMoney : 0.0;
  }

  public void setDrawMoney(Double drawMoney) {
    this.drawMoney = drawMoney;
  }

  public Double getNodrawMoney() {
    return nodrawMoney != null ? nodrawMoney : 0.0;
  }

  public void setNodrawMoney(Double nodrawMoney) {
    this.nodrawMoney = nodrawMoney;
  }

  public Double getFrozenMoney() {
    return frozenMoney != null ? frozenMoney : 0.0;
  }

  public void setFrozenMoney(Double frozenMoney) {
    this.frozenMoney = frozenMoney;
  }

  public Long getEnterpriseId() {
    return enterpriseId;
  }

  public void setEnterprise_id(Long enterpriseId) {
    this.enterpriseId = enterpriseId;
  }

  public String getEnterprise_name() {
    return enterpriseName != null ? enterpriseName : "";
  }

  public void setEnterprise_name(String enterpriseName) {
    this.enterpriseName = enterpriseName == null ? null : enterpriseName.trim();
  }

  public String getPlateNumber() {
    return plateNumber != null ? plateNumber : "";
  }

  public void setPlateNumber(String plateNumber) {
    this.plateNumber = plateNumber == null ? null : plateNumber.trim();
  }

  public String getPhoto() {
    return photo != null ? photo : "";
  }

  public void setPhoto(String photo) {
    this.photo = photo == null ? null : photo.trim();
  }

  public Long getGradeId() {
    return gradeId;
  }

  public void setGradeId(Long gradeId) {
    this.gradeId = gradeId;
  }

  public String getGradeName() {
    return gradeName != null ? gradeName : "";
  }

  public void setGradeName(String gradeName) {
    this.gradeName = gradeName == null ? null : gradeName.trim();
  }

  public Boolean getInBlackList() {
    return inBlackList;
  }

  public void setInBlackList(Boolean inBlackList) {
    this.inBlackList = inBlackList;
  }

  public Integer getType() {
    return type;
  }

  public void setType(Integer type) {
    this.type = type;
  }

  public String getIdcard() {
    return idcard;
  }

  public void setIdcard(String idcard) {
    this.idcard = idcard == null ? null : idcard.trim();
  }

  public Integer getGender() {
    return gender;
  }

  public void setGender(Integer gender) {
    this.gender = gender;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email == null ? null : email.trim();
  }

  public String getMemo() {
    return memo;
  }

  public void setMemo(String memo) {
    this.memo = memo == null ? null : memo.trim();
  }

  public Double getLatitude() {
    return latitude;
  }

  public void setLatitude(Double latitude) {
    this.latitude = latitude;
  }

  public Double getLongitude() {
    return longitude;
  }

  public void setLongitude(Double longitude) {
    this.longitude = longitude;
  }

  public String getAddress() {
    return address != null ? address : "";
  }

  public void setAddress(String address) {
    this.address = address == null ? null : address.trim();
  }

  public Date getCreated() {
    return created;
  }

  public void setCreated(Date created) {
    this.created = created;
  }

  public Date getUpdated() {
    return updated;
  }

  public void setUpdated(Date updated) {
    this.updated = updated;
  }

  public Integer getVersion() {
    return version;
  }

  public void setVersion(Integer version) {
    this.version = version;
  }

  public Long getChannelId() {
    return channelId;
  }

  public void setChannelId(Long channelId) {
    this.channelId = channelId;
  }

  public String getChannelName() {
    return channelName != null ? channelName : "";
  }

  public void setChannelName(String channelName) {
    this.channelName = channelName == null ? null : channelName.trim();
  }

  public String getAppKey() {
    return appKey;
  }

  public void setAppKey(String appKey) {
    this.appKey = appKey == null ? null : appKey.trim();
  }

  public Long getCompanyId() {
    return companyId;
  }

  public void setCompanyId(Long companyId) {
    this.companyId = companyId;
  }

  public String getCompanyName() {
    return companyName != null ? companyName : "";
  }

  public void setCompanyName(String companyName) {
    this.companyName = companyName == null ? null : companyName.trim();
  }

  public String getIntroducer() {
    return introducer;
  }

  public void setIntroducer(String introducer) {
    this.introducer = introducer == null ? null : introducer.trim();
  }

  public Integer getIntroduceType() {
    return introduceType;
  }

  public void setIntroduceType(Integer introduceType) {
    this.introduceType = introduceType;
  }
  
  public PassengerGrade getPassengerGrade() {
    return passengerGrade;
  }

  public void setPassengerGrade(PassengerGrade passengerGrade) {
    this.passengerGrade = passengerGrade;
  }

  @Override
  public boolean equals(Object that) {
    if (this == that) {
      return true;
    }
    if (that == null) {
      return false;
    }
    if (getClass() != that.getClass()) {
      return false;
    }
    Passenger other = (Passenger) that;
    return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
        && (this.getName() == null ? other.getName() == null : this.getName().equals(
            other.getName()))
        && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(
            other.getPhone()))
        && (this.getAllowOverdraw() == null ? other.getAllowOverdraw() == null : this
            .getAllowOverdraw().equals(other.getAllowOverdraw()))
        && (this.getDrawMoney() == null ? other.getDrawMoney() == null : this.getDrawMoney()
            .equals(other.getDrawMoney()))
        && (this.getNodrawMoney() == null ? other.getNodrawMoney() == null : this.getNodrawMoney()
            .equals(other.getNodrawMoney()))
        && (this.getFrozenMoney() == null ? other.getFrozenMoney() == null : this.getFrozenMoney()
            .equals(other.getFrozenMoney()))
        && (this.getEnterpriseId() == null ? other.getEnterpriseId() == null : this
            .getEnterpriseId().equals(other.getEnterpriseId()))
        && (this.getEnterprise_name() == null ? other.getEnterprise_name() == null : this
            .getEnterprise_name().equals(other.getEnterprise_name()))
        && (this.getPlateNumber() == null ? other.getPlateNumber() == null : this.getPlateNumber()
            .equals(other.getPlateNumber()))
        && (this.getPhoto() == null ? other.getPhoto() == null : this.getPhoto().equals(
            other.getPhoto()))
        && (this.getGradeId() == null ? other.getGradeId() == null : this.getGradeId().equals(
            other.getGradeId()))
        && (this.getGradeName() == null ? other.getGradeName() == null : this.getGradeName()
            .equals(other.getGradeName()))
        && (this.getInBlackList() == null ? other.getInBlackList() == null : this.getInBlackList()
            .equals(other.getInBlackList()))
        && (this.getType() == null ? other.getType() == null : this.getType().equals(
            other.getType()))
        && (this.getIdcard() == null ? other.getIdcard() == null : this.getIdcard().equals(
            other.getIdcard()))
        && (this.getGender() == null ? other.getGender() == null : this.getGender().equals(
            other.getGender()))
        && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(
            other.getEmail()))
        && (this.getMemo() == null ? other.getMemo() == null : this.getMemo().equals(
            other.getMemo()))
        && (this.getLatitude() == null ? other.getLatitude() == null : this.getLatitude().equals(
            other.getLatitude()))
        && (this.getLongitude() == null ? other.getLongitude() == null : this.getLongitude()
            .equals(other.getLongitude()))
        && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(
            other.getAddress()))
        && (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(
            other.getCreated()))
        && (this.getUpdated() == null ? other.getUpdated() == null : this.getUpdated().equals(
            other.getUpdated()))
        && (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(
            other.getVersion()))
        && (this.getChannelId() == null ? other.getChannelId() == null : this.getChannelId()
            .equals(other.getChannelId()))
        && (this.getChannelName() == null ? other.getChannelName() == null : this
            .getChannelName().equals(other.getChannelName()))
        && (this.getAppKey() == null ? other.getAppKey() == null : this.getAppKey().equals(
            other.getAppKey()))
        && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId()
            .equals(other.getCompanyId()))
        && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName()
            .equals(other.getCompanyName()))
        && (this.getIntroducer() == null ? other.getIntroducer() == null : this.getIntroducer()
            .equals(other.getIntroducer()))
        && (this.getIntroduceType() == null ? other.getIntroduceType() == null : this
            .getIntroduceType().equals(other.getIntroduceType()));
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
    result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
    result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
    result = prime * result + ((getAllowOverdraw() == null) ? 0 : getAllowOverdraw().hashCode());
    result = prime * result + ((getDrawMoney() == null) ? 0 : getDrawMoney().hashCode());
    result = prime * result + ((getNodrawMoney() == null) ? 0 : getNodrawMoney().hashCode());
    result = prime * result + ((getFrozenMoney() == null) ? 0 : getFrozenMoney().hashCode());
    result = prime * result + ((getEnterpriseId() == null) ? 0 : getEnterpriseId().hashCode());
    result =
        prime * result + ((getEnterprise_name() == null) ? 0 : getEnterprise_name().hashCode());
    result = prime * result + ((getPlateNumber() == null) ? 0 : getPlateNumber().hashCode());
    result = prime * result + ((getPhoto() == null) ? 0 : getPhoto().hashCode());
    result = prime * result + ((getGradeId() == null) ? 0 : getGradeId().hashCode());
    result = prime * result + ((getGradeName() == null) ? 0 : getGradeName().hashCode());
    result = prime * result + ((getInBlackList() == null) ? 0 : getInBlackList().hashCode());
    result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
    result = prime * result + ((getIdcard() == null) ? 0 : getIdcard().hashCode());
    result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
    result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
    result = prime * result + ((getMemo() == null) ? 0 : getMemo().hashCode());
    result = prime * result + ((getLatitude() == null) ? 0 : getLatitude().hashCode());
    result = prime * result + ((getLongitude() == null) ? 0 : getLongitude().hashCode());
    result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
    result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
    result = prime * result + ((getUpdated() == null) ? 0 : getUpdated().hashCode());
    result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode());
    result = prime * result + ((getChannelId() == null) ? 0 : getChannelId().hashCode());
    result = prime * result + ((getChannelName() == null) ? 0 : getChannelName().hashCode());
    result = prime * result + ((getAppKey() == null) ? 0 : getAppKey().hashCode());
    result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
    result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode());
    result = prime * result + ((getIntroducer() == null) ? 0 : getIntroducer().hashCode());
    result = prime * result + ((getIntroduceType() == null) ? 0 : getIntroduceType().hashCode());
    return result;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append(getClass().getSimpleName());
    sb.append('[');
    sb.append("Hash = ").append(hashCode());
    sb.append(", id=").append(id);
    sb.append(", name=").append(name);
    sb.append(", phone=").append(phone);
    sb.append(", allowOverdraw=").append(allowOverdraw);
    sb.append(", drawMoney=").append(drawMoney);
    sb.append(", nodrawMoney=").append(nodrawMoney);
    sb.append(", frozenMoney=").append(frozenMoney);
    sb.append(", enterprise_id=").append(enterpriseId);
    sb.append(", enterprise_name=").append(enterpriseName);
    sb.append(", plateNumber=").append(plateNumber);
    sb.append(", photo=").append(photo);
    sb.append(", grade_id=").append(gradeId);
    sb.append(", grade_name=").append(gradeName);
    sb.append(", inBlackList=").append(inBlackList);
    sb.append(", type=").append(type);
    sb.append(", idcard=").append(idcard);
    sb.append(", gender=").append(gender);
    sb.append(", email=").append(email);
    sb.append(", memo=").append(memo);
    sb.append(", latitude=").append(latitude);
    sb.append(", longitude=").append(longitude);
    sb.append(", address=").append(address);
    sb.append(", created=").append(created);
    sb.append(", updated=").append(updated);
    sb.append(", version=").append(version);
    sb.append(", channel_id=").append(channelId);
    sb.append(", channel_name=").append(channelName);
    sb.append(", appKey=").append(appKey);
    sb.append(", companyId=").append(companyId);
    sb.append(", companyName=").append(companyName);
    sb.append(", introducer=").append(introducer);
    sb.append(", introduceType=").append(introduceType);
    sb.append(", serialVersionUID=").append(serialVersionUID);
    sb.append(']');
    return sb.toString();
  }
}
